package unit03.day02;

public class TestObject {

	public static void main(String[] args) {
		ObjectDemo1 obj1 = new ObjectDemo1(1,2);
		String str = obj1.toString();		//这是父类Object的toString方法
		/**
		 * System.out.println(Object obj)
		 * 输出的是给定对象toString返回的字符串
		 * */
		System.out.println(obj1);
		ObjectDemo1 obj2 = new ObjectDemo1(1,2);
		System.out.println(obj1 == obj2);
		System.out.println(obj1.equals(obj2));
	}
}
